<?php 
	include ('../inicio/conectarse.php');
	include ('../inicio/encabezadoPedidos.php');
?>


<div id="content">
	<h1>Arma Tu Pedido!!</h1>
		<ul id="nav">
			<?
				$sql="SELECT a.ID_CATEGORIA as ID, a.NOMBRE FROM categorias a";
				$result = mysql_query($sql);
				while ($fila = mysql_fetch_array($result, MYSQL_ASSOC)) {
					echo '<li><a href="#">'.$fila['NOMBRE'].'</a><ul>';
					$sql2="SELECT NOMBRE, ID_PRODUCTO FROM productos WHERE ID_CATEGORIA=".$fila['ID'];
					$result2 = mysql_query($sql2);
					while ($fila2 = mysql_fetch_array($result2, MYSQL_ASSOC)) {
						echo '<li onclick="MostrarConsulta(\'../../paginas/user/ajax-exec.php?q='.$fila2["ID_PRODUCTO"].'\',\'content2\'); return false"><a href="#">'.$fila2['NOMBRE'].'</a></li>';
					}
					echo '</ul></li>';
				}
				echo '<li><a href="#">Promociones</a><ul>';
				echo '</ul></li>';
			?>
		</ul>
	<a href="../inicio/index.php"><img src="../../images/images3.jpg" /></a>
	<div id="content2">	    	 
	<h2>Todo Lo Que Quieras Como Quieras</h2>
		<div id="wooden-table"><img src="../../images/wooden-table.jpg" alt="Wooden table image" /></div>

	    <div id="lighttable">
			<img src="../../images/menu1.jpg" alt="Bird Marking" />
			<img src="../../images/menu2.jpg" alt="Double Propellors" />
			<img src="../../images/menu3.jpg" alt="Moody Listener Satellite Dish" />
			<img src="../../images/menu5.jpg" alt="Orange Hatches" />
			<img src="../../images/menu6.jpg" alt="Plane Nose Closeup" />
	    </div>
	
	</div>	
</div>

<!-- Footer -->
	<div id="footer">
		<div class="fleft">Copyright statement.</div>
		<div class="fright">Professional free website templates <a href="http://www.websitetemplatesonline.com" target="_blank">at www.websitetemplatesonline.com</a>.</div><div class="fclear"></div>
		<div class="fcenter">Template Designed By: <a href="http://www.mytemplatebox.com/">Free Website Templates</a></div>
	</div>
</div>

</body>
</html>